package cn.edu.zju.core.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 请求参数
 * </p>
 *
 * @author zcx
 * @since 2024-06-06
 */
@Getter
@Setter
@TableName("req_parameter")
@Schema(name = "ReqParameter", description = "$!{table.comment}")
public class ReqParameter implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "参数名称")
    private String name;

    @Schema(description = "数据类型")
    private String dataType;

    @Schema(description = "是否允许为空")
    private Boolean nullAble;

    @Schema(description = "示例参数")
    private String demoValue;

    @Schema(description = "参数说明")
    private String valueDesc;

    @Schema(description = "排序")
    private Integer sort;

    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @Schema(description = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime editTime;

    @Schema(description = "所属模型id")
    private Integer modelId;

    @Schema(description = "出入参类型,0:入参、1:出参")
    private Integer type;

    @Schema(description = "参数单位")
    private String unit;

    @Schema(description = "参数范围")
    private String scope;
}
